package com.fattyCorps.common.packet;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

@Data
public class Mail extends PacketElem {
    private String title;
    private String content;
    private String attachment;
    private boolean isRead;
    private boolean isGetAttachment;
    private int time;
    private String sender;

    public static Mail makeMail(String title, String content, String attachment) {
        Mail mail = new Mail();
        mail.setTitle(title);
        mail.setContent(content);
        mail.setAttachment(attachment);
        mail.setRead(false);
        mail.setGetAttachment(false);
        mail.setTime((int) (System.currentTimeMillis() / 1000));

        return mail;
    }
}
